//
//  YTPickerContainerView.h
//  YTShoot
//
//  Created by Eco on 10/4/16.
//  Copyright © 2016 Air. All rights reserved.
//

#import <UIKit/UIKit.h>

@class YTPickerContainerView;

@protocol YTPickerContainerViewDelegate <NSObject>

@optional

//视图将要弹出时
- (void)pickerContainerViewWillShow:(YTPickerContainerView *)containerView;

//视图将要隐藏时
- (void)pickerContainerViewWillHide:(YTPickerContainerView *)containerView;

//视图将点击确定按钮时
- (void)pickerContainerViewDidDone:(YTPickerContainerView *)containerView;

//取消
- (void)pickerContainerViewDidCancel:(YTPickerContainerView *)containerView;

//进入下一项
- (BOOL)pickerContainerViewShouldEntryNext:(YTPickerContainerView *)containerView;

@end

@interface YTPickerContainerView : UIView

//设置委托
@property (nonatomic, weak) id<YTPickerContainerViewDelegate> delegate;

//取消按钮
@property (nonatomic, readonly) UIBarButtonItem *cancelButtonItem;

//确认按钮
@property (nonatomic, readonly) UIBarButtonItem *doneButtonItem;

@property (nonatomic, readonly) UIView *pickerView;

//设置标题
- (void)setTitle:(NSString *)title;

//获取标题
- (NSString *)title;

//可见尺寸
- (CGRect)visibleFrame;

//弹出选择框
- (void)showPickerView:(UIPickerView *)pickerView inView:(UIView *)view;

//弹出日期选择框
- (void)showDatePicker:(UIDatePicker *)datePicker inView:(UIView *)view;

//工具框
- (UIToolbar *)toolbar;

@end
